package com.example.lotterysystem.service;

import com.example.lotterysystem.controller.param.DrawPrizeParam;
import com.example.lotterysystem.controller.param.ShowWinningRecordsParam;
import com.example.lotterysystem.dao.dataobject.WinningRecordDO;
import com.example.lotterysystem.service.dto.WinningRecordResultDTO;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface DrawPrizeService {

    /**
     * 异步抽奖，接⼝只做奖品数校验即可返回。
     * @param param
     */
   void drawPrize(DrawPrizeParam param);

    /**
     * 校验参数是否有效
     * @param param
     */
    Boolean checkDrawPrizeParam(DrawPrizeParam param);

    /**
     * 保存中奖者信息
     *
     * @param param
     * @return
     */
    List<WinningRecordDO> saveWinningRecords(DrawPrizeParam param);

    /**
     * 删除活动/奖品下的中奖记录
     * @param activityId
     * @param prizeId
     */
    void deleteRecords(Long activityId, Long prizeId);


    /**
     * 获取中奖记录
     * @param param
     * @return
     */
    List<WinningRecordResultDTO> getRecords(ShowWinningRecordsParam param);
}
